package com.xw.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * @Description: 新闻实体类
 * @Author: ASUS
 * @Date: 2024/12/19 9:17
 * @Version: 1.0
 */

@Data
public class News {
    private Integer id;
    @ApiModelProperty(value = "标题")
    @NotBlank(message = "标题不能为空!")
    private String title;
    @ApiModelProperty(value = "内容")
    @NotBlank(message = "内容不能为空!")
    private String content;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    private Date updateTime;
}
